﻿using System;

namespace DatabaseStuff.Basic
{
    /// <summary>
    /// Basic implementation of data in a database
    /// </summary>
    public class DBData: DatabaseStuff.IDBData
    {
        private Field field;
        private Record record;
        private object data;

        public DBData(Field _field, Record _record)
        {
            field = _field;
            record = _record;
        }

        public DBData(Field _field, Record _record, object _data)
        {
            field = _field;
            record = _record;
            data = _data;
        }

        public Field Field
        {
            get { return field; }
        }

        public Record Record
        {
            get { return record; }
        }

        public object Data
        {
            get { return data; }
            set { data = value; }
        }

        IDBField IDBData.Field
        {
            get { return Field; }
        }

        IDBRecord IDBData.Record
        {
            get { return Record; }
        }
    }
}
